package com.fly.service.Impl;

import com.fly.bean.SystemProperties;
import com.fly.bean.SystemPropertiesValue;
import com.fly.mapper.SysProMapper;
import com.fly.service.SysProService;
import com.fly.vo.SysPro_lmg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysProServiceImpl implements SysProService {

    @Autowired
    SysProMapper sysProMapper;

    @Override
    public List<SystemProperties> getAllSysPro() {
        return sysProMapper.getAllSysPro();
    }

    @Override
    public int insertSysPro(SystemProperties systemPropertie) {
        return sysProMapper.insertSysPro(systemPropertie);
    }

    @Override
    public int insertSysProValues(Integer sysProId, String sysProValueName) {
        int sysProValueId = sysProMapper.selectsysProValueIdBysysProId(sysProId);
        return sysProMapper.insertSysProValues(sysProId,sysProValueId, sysProValueName);
    }

    @Override
    public int updateSysPro(SystemProperties systemProperties) {
        return sysProMapper.updateSysPro(systemProperties);
    }

    @Override
    public int updateSysProState(SystemProperties systemProperties) {
        return sysProMapper.updateSysProState(systemProperties);
    }

    @Override
    public List<SysPro_lmg> getAllSysProl() {
        return sysProMapper.getAllSysProl();
    }


}
